-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaned up logging and replaced sprintf with snprintf #9
Conversation
I tried to fix the error
But could not fix it. Seems Xapian does not create the iamglass file in all cases and opening the DB read-only fails in fts_backend_xapian_check_read(). But I am not so sure that it is a real error, when a not existent DB could not be opened for read-only. Maybe the whole logging can be removed. Or should I create an issue for that? |
Can you try to remov completely the folder /var/spool/mail/iwascoding/paul/mdbox/xapian-indexes/db_92e09535c5888a5658100000654d370e and see if error comes back ? |
I always remove all xapian-indexes folders before installing/testing a new plugin. As of the logs it is clear that
does not create the iamglass file. Most of the time the file is created properly, so maybe its just a timing issue. But should this be treated as an error? |
I do not face this isue in Xapian 1.4.9
By default, I find :
drwx------ 2 mailusers mail 4096 Jan 20 16:12 .
drwx------ 287 mailusers mail 20480 Jan 20 17:08 ..
-rw------- 1 mailusers mail 0 Jan 20 16:12 flintlock
-rw------- 1 mailusers mail 77 Jan 20 16:12 iamglass
-rw------- 1 mailusers mail 0 Jan 20 16:12 postlist.glass
-rw------- 1 mailusers mail 0 Jan 20 16:12 termlist.glass
what version of Xapian are you using ?
… |
Currently 1.4.3 again. But anyhow, it indexes the folder successfully in the same process, so maybe it can ignored. |
Still the same error with 1.4.9 (backports for stretch). |
What is the need for snprintf ? |
Its more secure and we have found the bug with the malloc-length much ealier. |
If you do
Xapian::WritableDatabase db(backend->db,Xapian::DB_CREATE_OR_OPEN);
Xapian::Document doc;
Xapian::docid did=db.add_document(doc);
db.commit();
db.remove_document(did);
db.commit();
db.close();
does it create properly the glass files ?
On 2019-01-21 15:16, Paul Hecker wrote:
Currently 1.4.3 again. But anyhow, it indexes the folder successfully in the same process, so maybe it can ignored.
--
You are receiving this because you commented.
Reply to this email directly, view it on GitHub [1], or mute the thread [2].
|
No, the error still appears. But as I said, its only sometimes, most of the time the first index run and the creation of the database works just fine. Can't we just ignore the error? As it is only the case when we want to search in a not existing DB. And when the indexer starts running the error is gone. Additionally: currently it seems that only folders with no messages are affected by this error. |
yes, let's put it aside for now. Also I can not repeat the bug.
for the log, I cleaned them as you suggested in the pull request
I changed the snprintf , similar to your pull request
|
No description provided.